//
//  WQCalendarTeacherCellView.m
//  iBaby365v2
//
//  Created by Kirinrin on 14/12/20.
//  Copyright (c) 2014年 suplus. All rights reserved.
//

#import "WQCalendarTeacherCellView.h"

@interface WQCalendarTeacherCellView()
@property (strong, nonatomic)UIImageView *markImageView;
@end

@implementation WQCalendarTeacherCellView


- (void)drawRect:(CGRect)rect
{
    
    
    if (_day) {
        _dayLable = [[UILabel alloc]initWithFrame:CGRectMake(3, 3, 20, 10)];
        [_dayLable setFont:[UIFont fontWithName:@"HelveticaNeue" size:12]];
        
        if (_isWeekEnd) {
            if (_isCurrentMonthDay) {
                _dayLable.textColor = RGBACOLOR(240, 0, 0, 0.8);
            }else{
                _dayLable.textColor = RGBACOLOR(240, 0, 0, 0.4);
            }
        }else{
            if (_isCurrentMonthDay) {
                _dayLable.textColor = RGBACOLOR(40, 40, 40, 0.8);
            }else{
                _dayLable.textColor = RGBACOLOR(40, 40, 40, 0.4);
            }
        }
        [_dayLable setText:_day];
        [self addSubview:_dayLable];
    }
    
    if (self.isMark) {
        self.markImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"签到标记"]];
        CGRect frame = CGRectMake(13, 16, 24, 24);
        self.markImageView.frame = frame;
        [self addSubview:self.markImageView];
    }
}
-(void)setSelected:(BOOL)selected{
    if (selected) {
        self.backgroundColor = RGBACOLOR(254, 238, 221, 0.8);
    }else{
        self.backgroundColor = [UIColor whiteColor];
    }
}
@end
